package cn.ywsj.ywsjmidtier.controller;

import cn.ywsj.ywsjmidtier.entity.VO.ProductSkuQueryVo;
import cn.ywsj.ywsjmidtier.service.WechatProductSkuFeign;
import cn.ywsj.ywsjmidtier.utils.JsonObjectUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping({"/wechat/sku"})
public class WechatProductSkuController {

    @Autowired
    private WechatProductSkuFeign skuFeign;

    @RequestMapping({"/list"})
    public String maxProduct(String type, ProductSkuQueryVo productSkuQueryVo) {
        return skuFeign.maxProduct(type, JsonObjectUtil.ObjectToJson(productSkuQueryVo));
    }

    @RequestMapping({"/queryroductsku"})
    public String findProductSku(Long prodId) {
       return skuFeign.findProductSku(prodId);
    }

}
